using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Table
{
    /// <summary>
    /// <para>Analyze</para>
    /// <para>Updates database statistics of business tables, feature tables, and delta tables, along with the statistics of those tables' indexes.</para>
    /// <para>更新业务表、要素表和增量表的数据库统计数据，以及这些表索引的统计数据。</para>
    /// </summary>    
    [DisplayName("Analyze")]
    public class Analyze : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Analyze()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dataset">
        /// <para>Input Dataset</para>
        /// <para>The table or feature class to be analyzed.</para>
        /// <para>要分析的表或要素类。</para>
        /// </param>
        /// <param name="_components">
        /// <para>Components to Analyze</para>
        /// <para><xdoc>
        ///   <para>The component type to be analyzed.</para>
        ///   <bulletList>
        ///     <bullet_item>Business table—Updates business rules statistics.</bullet_item><para/>
        ///     <bullet_item>Feature table—Updates feature statistics.</bullet_item><para/>
        ///     <bullet_item>Raster table—Updates statistics on raster tables.</bullet_item><para/>
        ///     <bullet_item>Adds table—Updates statistics on added datasets.</bullet_item><para/>
        ///     <bullet_item>Deletes table—Updates statistics on deleted datasets.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要分析的组件类型。</para>
        ///   <bulletList>
        ///     <bullet_item>业务表 - 更新业务规则统计信息。</bullet_item><para/>
        ///     <bullet_item>要素表 - 更新要素统计数据。</bullet_item><para/>
        ///     <bullet_item>栅格表 - 更新栅格表的统计数据。</bullet_item><para/>
        ///     <bullet_item>添加表 - 更新已添加数据集的统计数据。</bullet_item><para/>
        ///     <bullet_item>删除表 - 更新已删除数据集的统计数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public Analyze(object _in_dataset, List<object> _components)
        {
            this._in_dataset = _in_dataset;
            this._components = _components;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Analyze";

        public override string CallName => "management.Analyze";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_dataset, _components, _out_dataset];

        /// <summary>
        /// <para>Input Dataset</para>
        /// <para>The table or feature class to be analyzed.</para>
        /// <para>要分析的表或要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dataset { get; set; }


        /// <summary>
        /// <para>Components to Analyze</para>
        /// <para><xdoc>
        ///   <para>The component type to be analyzed.</para>
        ///   <bulletList>
        ///     <bullet_item>Business table—Updates business rules statistics.</bullet_item><para/>
        ///     <bullet_item>Feature table—Updates feature statistics.</bullet_item><para/>
        ///     <bullet_item>Raster table—Updates statistics on raster tables.</bullet_item><para/>
        ///     <bullet_item>Adds table—Updates statistics on added datasets.</bullet_item><para/>
        ///     <bullet_item>Deletes table—Updates statistics on deleted datasets.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要分析的组件类型。</para>
        ///   <bulletList>
        ///     <bullet_item>业务表 - 更新业务规则统计信息。</bullet_item><para/>
        ///     <bullet_item>要素表 - 更新要素统计数据。</bullet_item><para/>
        ///     <bullet_item>栅格表 - 更新栅格表的统计数据。</bullet_item><para/>
        ///     <bullet_item>添加表 - 更新已添加数据集的统计数据。</bullet_item><para/>
        ///     <bullet_item>删除表 - 更新已删除数据集的统计数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Components to Analyze")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _components { get; set; }


        /// <summary>
        /// <para>Output Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_dataset { get; set; }


        public Analyze SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}